---
title: "s3_analysis"
author: "ASD"
date: "`r Sys.Date()`"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = F)
knitr::opts_chunk$set(message = F)
knitr::opts_chunk$set(warning = F)
```

```{r}
### Load packages 
## install.packages("devtools") if needed
#devtools::install_github("ekhartman/equivtest")
library(equivtest)
library(pwr)
library(haven)
library(ggh4x)
library(stargazer)
library(tidyverse)

se <- function(x, na.rm = TRUE) {
  sd(x, na.rm = na.rm) / sqrt(length(!is.na(x)))
}

## Load data 
load("processed_data/dvmeans.rda")
load("processed_data/grouped_means.rda")
load("processed_data/studies_1_4.rda")
load("processed_data/treatment_means.rda")
load("processed_data/studies.rda")
load("processed_data/treatment_rr.rda")
```

# Figures 

## H1 FIGURE 2 MAIN

```{r}

## Relabel group means 
grouped_means <- grouped_means |> 
  mutate(
    study = factor(study,
                   levels = c(1, 2, 3, 4),
                   labels = c("Experiment 1",
                              "Experiment 2",
                              "Experiment 3",
                              "Experiment 4")),
    timing = factor(timing),
    timing = fct_recode(timing,
                             "Two-Wave" = "Distal",
                             "Post" = "Post",
                             "Pre" = "Proximal"))


ggplot(
  subset(grouped_means |>  mutate(timing = fct_relevel(timing, 
                                                      "Two-Wave", "Post", "Pre")), 
         study %in% c("Experiment 1", "Experiment 4")),
  aes(
    x = timing,
    y = symrac01mean,
    width = 0.5,
    color = timing,
    shape = timing
  )
) +
  geom_point(size = 2, position = position_dodge(width = .7)) +
  scale_shape_manual(name = "Experiment", values = c(3, 2, 1)) +
  scale_color_manual(name = "Experiment", values = c("black", "grey42", "grey65")) +
  scale_x_discrete(labels = c("Two-\nwave", "Post", "Pre")) +
  #ylim(0.325, .725) +
  ylim(0.425, .725) +
  labs(y = "Mean Symbolic Racism", x = NULL, color = "Category") +
  geom_errorbar(
    aes(
      ymin = symrac01mean - 1.96 * symrac01se,
      ymax = symrac01mean + 1.96 * symrac01se
    ),
    width = .1,
    position = position_dodge(.7)
  ) +
  theme_bw() +
  facet_wrap(~ study, nrow = 2, strip.position = "left") +
  theme(
    axis.text = element_text(size = 9),
    axis.title = element_text(size = 12),
    #axis.text.y = element_blank(),
    #axis.ticks.y = element_blank(),
    legend.position = "none"
  ) +
  coord_flip() +
  ylim(0, 1)

```

## H2 FIGURE 3 MAIN
```{r}
## fix dv means

dvmeans <- dvmeans |> 
  mutate(
    study = factor(study,
                   levels = c(1, 2, 3, 4),
                   labels = c("Experiment 1",
                              "Experiment 2",
                              "Experiment 3",
                              "Experiment 4")),
    timing = factor(timing),
    timing = fct_recode(timing,
                        "Two-Wave" = "Distal",
                        "Post" = "Post",
                        "Pre" = "Proximal"))

## plot

ggplot(
  subset(dvmeans |>  mutate(timing = fct_relevel(timing, 
                                                 "Two-Wave", "Post", "Pre")), study %in% c("Experiment 1",  "Experiment 4")),
  aes(
    x = timing,
    y = means,
    width = 0.5,
    #group = interaction(timing, dv),
    color = timing,
    shape = timing
  )
) +
  geom_point(size = 2, position = position_dodge(width = .8)) +
  scale_shape_manual(name = "Placement", values = c(3, 2, 1)) +
  scale_color_manual(name = "Placement", values = c("black", "grey42", "grey65")) +
  scale_x_discrete(labels = c("Two-\nwave", "Post", "Pre")) +
  #ylim(0.325, .725) +
  ylim(0.425, .725) +
  labs(y = "Index Mean", x = NULL, color = "Category") +
  geom_errorbar(
    aes(ymin = means - 1.96 * se, ymax = means + 1.96 * se),
    width = .2,
    position = position_dodge(.8)
  ) +
  theme_bw() +
  theme(
    axis.text = element_text(size = 9),
    axis.title = element_text(size = 12),
    #axis.text.y = element_blank(),
    #axis.ticks.y = element_blank(),
    #legend.text = element_text(size = 7),
    legend.title = element_text(hjust = 0.5),
    #legend.title.position = "top",
    legend.position = "none",
    #legend.direction = "horizontal",
    #legend.box = "horizontal",
    #legend.spacing.x = unit(0, "mm"),
    panel.border = element_rect(colour = "black", fill =
                                  NA),
    #legend.background = element_blank(),
    #aspect.ratio = 1, axis.text = element_text(colour = 1, size = 12),
    
   legend.box.background = element_rect(colour = "black")
  ) +
  coord_flip() +
  facet_grid(study ~ dv) +
  ylim(0,1)
```

## H3 FIGURE 4 MAIN
```{r}
###### H3 FIGURE 4 MAIN ######

# only run this once!
treatmentdouble <- treatmentdouble |> 
  filter(three_conditions != c("Control")) |> 
  rename(treatment = three_conditions)

treatmentdouble_edit <- treatmentdouble |> 
  mutate(study = factor(study,
                        levels = c(1, 2, 3, 4),
                        labels = c("Experiment 1",
                                   "Experiment 2",
                                   "Experiment 3",
                                   "Experiment 4")),
         timing = fct_recode(timing,
                             "Two-Wave" = "Distal",
                             "Post" = "Post",
                             "Pre" = "Proximal")) 


ggplot(
  subset(treatmentdouble_edit |>  mutate(timing = fct_relevel(timing, 
                                                              "Two-Wave", "Post", "Pre")), study %in% c("Experiment 1",  "Experiment 4")),
  aes(
    x = treatment,
    y = means,
    width = .5,
    color = timing,
    shape = timing
  )
) +
  geom_point(size = 2, position = position_dodge(width = 0.7)) +
  scale_shape_manual(name = "Placement of Sensitive Items", values = c(3, 2, 1)) +
  scale_color_manual(name = "Placement of Sensitive Items", values = c("black", "grey42", "grey65")) +
  ylim(0.325, .725) +
  labs(y = "Index Mean", color = "Category", x = NULL) +
  geom_errorbar(
    aes(ymin = means - 1.96 * se, ymax = means + 1.96 * se),
    width = .2,
    position = position_dodge(0.7)
  ) +
  theme_bw() +
  theme(
    legend.position = "bottom",
    legend.direction = "horizontal",
    legend.box = "horizontal",
    legend.title.position = "top",
    legend.title = element_text(hjust = 0.5),
    legend.box.background = element_rect(colour = "black"), 
    panel.spacing.x = unit(0.75, "lines")
  ) +
  facet_grid(study ~ dv) +
  coord_flip() +
  guides(shape = guide_legend(title.position="top",
                              title.hjust = 0.5,
                              reverse = T),
         color = guide_legend(title.position="top",
                              title.hjust = 0.5,
                              reverse = T)
  )+
  ylim(0,1)
```

## H4 FIGURE 5 MAIN
```{r}
##### H4 FIGURE 5 MAIN #####

# only run this once!
treatmentdoubleRR <- treatmentdoubleRR |> 
  filter(three_conditions != c("Control")) |> 
  rename(treatment = three_conditions)

treatmentdouble_editRR <- treatmentdoubleRR |> 
  mutate(study = factor(study,
                        levels = c(1, 2, 3, 4),
                        labels = c("Experiment 1",
                                   "Experiment 2",
                                   "Experiment 3",
                                   "Experiment 4")),
         timing = fct_recode(timing,
                             "Two-Wave" = "Distal",
                             "Post" = "Post",
                             "Pre" = "Proximal"),
         high_rr = factor(high_rr,
                          levels = c(0, 1),
                          labels = c("Low Symbolic Racism", "High Symbolic Racism"))) 

## plot

  ggplot(subset(treatmentdouble_editRR |>
                  mutate(timing = fct_relevel(timing,
                                              "Two-Wave", "Post", "Pre")) |> 
                  filter(!is.na(high_rr)), study %in% c("Experiment 1", "Experiment 4")),
    aes(
      x = treatment,
      y = means,
      width = .5,
      color = timing,
      shape = timing
    )
  ) +
  geom_point(size = 2, position = position_dodge(width = 0.7)) +
  scale_shape_manual(name = "Placement of Sensitive Items", values = c(3, 2, 1)) +
  scale_color_manual(name = "Placement of Sensitive Items", values = c("black", "grey42", "grey65")) +
  #ylim(0.325, .725) +
  #ylim(0.3, .9) +
  labs(y = "Index Mean", color = "Category", x = NULL) +
  geom_errorbar(
    aes(ymin = means - 1.96 * se, ymax = means + 1.96 * se),
    width = .2,
    position = position_dodge(0.7)
  ) +
  theme_bw() +
  theme(
    legend.position = "bottom",
    legend.direction = "horizontal",
    legend.box = "horizontal",
    legend.title.position = "top",
    legend.title = element_text(hjust = 0.5),
    legend.box.background = element_rect(colour = "black"), 
    panel.spacing.x = unit(0.7, "lines")
  ) +
  facet_nested(study ~ dv + high_rr) +
  coord_flip() +
    guides(shape = guide_legend(title.position="top",
                                title.hjust = 0.5,
                                reverse = T),
           color = guide_legend(title.position="top",
                                title.hjust = 0.5,
                                reverse = T)
    )+
    ylim(0,1)
```

# Tables
## H1

```{r, results='asis'}
## H1  Effect of Placement on Symbolic Racism (Appendix D.4, Table D.25) 
`study1timing_RR` <- lm(symrac01 ~ as.factor(timing), study1)
`study4timing_RR` <- lm(symrac01 ~ as.factor(timing), study4)

stargazer(
  `study1timing_RR`,
  `study4timing_RR`,
  type = "html",
  covariate.labels = c("Pre", "Post"),
  dep.var.caption = "Dependent Variable",
  dep.var.labels = "Symbolic Racism",
  column.labels = c("Experiment 1", "Experiment 4")
)
```


## H2
```{r, results='asis'}
`study1timing_hc` <- lm(hc_index ~ as.factor(timing), study1)
`study1timing_leader` <-
  lm(leader_index ~ as.factor(timing), study1)

`study4timing_hc` <- lm(hc_index ~ as.factor(timing), study4)
`study4timing_leader` <-
  lm(leader_index ~ as.factor(timing), study4)

stargazer(
  `study1timing_hc`,
  `study4timing_hc`,
  `study1timing_leader`,
  `study4timing_leader`,
  type = "html",
  covariate.labels = c("Pre", "Post"),
  dep.var.caption = "Dependent Variable",
  dep.var.labels = c("Health Care Index", "Leader Index"),
  column.labels = c("Experiment 1", "Experiment 4", "Experiment 1", "Experiment 4"),
  single.row = FALSE
)
```

## H3
```{r, results='asis'}
study1 <- study1 |> 
  mutate(three_conditions = factor(three_conditions))

study4 <- study4 |> 
  mutate(three_conditions = factor(three_conditions))

`s1t_exp_hc` <-
  lm(hc_index ~ as.factor(timing) * as.factor(three_conditions),
     study1)
`s1t_exp_l` <-
  lm(leader_index ~ as.factor(timing) * as.factor(three_conditions),
     study1)

`s4t_exp_hc` <-
  lm(hc_index ~ as.factor(timing) * as.factor(three_conditions),
     study4)
`s4t_exp_l` <-
  lm(leader_index ~ as.factor(timing) * as.factor(three_conditions),
     study4)

stargazer(
  `s1t_exp_hc`,
  `s4t_exp_hc`,
  `s1t_exp_l`,
  `s4t_exp_l`,
  type = "html",
  covariate.labels = c("Pre", "Post", "Implicit Treatment", "Pre*Implicit Treatment", "Post*Implicit Treatment"),
  dep.var.caption = "Dependent Variable",
  dep.var.labels = c("Health Care Index", "Leader Index"),
  column.labels = c("Experiment 1", "Experiment 4", "Experiment 1", "Experiment 4")
)
```


## H4 

```{r, results='asis'}
study1 <- study1 |> 
  mutate(three_conditions = factor(three_conditions))

study4 <- study4 |> 
  mutate(three_conditions = factor(three_conditions))

`s1_h4_hc` <-
  lm(hc_index ~ as.factor(timing) * as.factor(three_conditions) * symrac01,
     study1)
`s1_h4_l` <-
  lm(leader_index ~ as.factor(timing) * as.factor(three_conditions) * symrac01,
     study1)

`s4_h4_hc` <-
  lm(hc_index ~ as.factor(timing) * as.factor(three_conditions) * symrac01,
     study4)
`s4_h4_l` <-
  lm(leader_index ~ as.factor(timing) * as.factor(three_conditions) * symrac01,
     study4)

stargazer(
  `s1_h4_hc`,
  `s4_h4_hc`,
  `s1_h4_l`,
  `s4_h4_l`,
  type = "html",
  covariate.labels = c("Pre", "Post", "Implicit Treatment", "Symbolic Racism (SR)", "Pre x Implicit Treatment", "Post x Implicit Treatment", "Pre x SR", "Post x SR", "Implicit Treatment x SR", "Pre x Implicit Treatment x SR", "Post x Implicit Treatment x SR", "Constant"),
  dep.var.caption = "Dependent Variable",
  dep.var.labels = c("Health Care Index", "Leader Index"),
  column.labels = c("Experiment 1", "Experiment 4", "Experiment 1", "Experiment 4")
)

```
# T.Tests 

## H1
### Pre and post p-value symbolic racism
### Experiment 1
```{r}
t.test(study1$symrac01[study1$timing == 2], study1$symrac01[study1$timing ==
                                                              3])
```

### Experiment 4
```{r}
t.test(study4$symrac01[study4$timing == 2], study4$symrac01[study4$timing ==
                                                              3])
```

### Two-wave and pre p-value symbolic racism 
### Experiment 1
```{r}
t.test(study1$symrac01[study1$timing == 1], study1$symrac01[study1$timing ==
                                                              2])
```

### Experiment 4
```{r}
t.test(study4$symrac01[study4$timing == 1], study4$symrac01[study4$timing ==
                                                              2])
```

### Two-wave and post p-value symbolic racism
### Experiment 1
```{r}
t.test(study1$symrac01[study1$timing == 1], study1$symrac01[study1$timing ==
                                                              3])
```

### Experiment 4
```{r}
t.test(study4$symrac01[study4$timing == 1], study4$symrac01[study4$timing ==
                                                              3])
```

## H2 
### Pre and post p-value
#### Healthcare DV
##### Experiment 1
```{r}
t.test(study1$hc_index[study1$timing == 2], study1$hc_index[study1$timing ==
                                                              3])
```

##### Experiment 4
```{r}
t.test(study4$hc_index[study4$timing == 2], study4$hc_index[study4$timing ==
                                                              3])
```

#### Leader DV
##### Experiment 1
```{r}

t.test(study1$leader_index[study1$timing == 2], study1$leader_index[study1$timing ==
                                                                      3])
```

##### Experiment 4
```{r}
t.test(study4$leader_index[study4$timing == 2], study4$leader_index[study4$timing ==
                                                                      3])
```

### Two-wave and pre p-value
#### Healthcare DV
##### Experiment 1
```{r}
t.test(study1$hc_index[study1$timing == 1], study1$hc_index[study1$timing ==
                                                              2])
```

##### Experiment 4
```{r}
t.test(study4$hc_index[study4$timing == 1], study4$hc_index[study4$timing ==
                                                              2])
```

#### Leader DV
##### Experiment 1
```{r}
t.test(study1$leader_index[study1$timing == 1], study1$leader_index[study1$timing ==
                                                                      2])
```

##### Experiment 4
```{r}
t.test(study4$leader_index[study4$timing == 1], study4$leader_index[study4$timing ==
                                                                      2])
```


### Two-wave and post p-value

#### Healthcare DV
##### Experiment 1
```{r}
t.test(study1$hc_index[study1$timing == 1], study1$hc_index[study1$timing ==
                                                              3])
```

##### Experiment 4
```{r}
t.test(study4$hc_index[study4$timing == 1], study4$hc_index[study4$timing ==
                                                              3])
```

#### Leader DV
##### Experiment 1

```{r}
t.test(study1$leader_index[study1$timing == 1], study1$leader_index[study1$timing ==
                                                                      3])
```

##### Experiment 4
```{r}
t.test(study4$leader_index[study4$timing == 1], study4$leader_index[study4$timing ==
                                                                      3])
```

## H3 
### Pre and post p-value
#### Experiment 1
##### Healthcare DV & Implicit Treatment

```{r}
t.test(study1$hc_index[study1$timing == 2 &
                         study1$three_conditions == 1], study1$hc_index[study1$timing == 3 &
                                                                          study1$three_conditions == 1])
```

##### Healthcare DV & Explicit Treatment

```{r}
t.test(study1$hc_index[study1$timing == 2 &
                         study1$three_conditions == 0], study1$hc_index[study1$timing == 3 &
                                                                          study1$three_conditions == 0])
```

#### Experiment 4
##### Healthcare DV & Implicit Treatment

```{r}
t.test(study4$hc_index[study4$timing == 2 &
                         study4$three_conditions == 1], study4$hc_index[study4$timing == 3 &
                                                                          study4$three_conditions == 1])
```

##### Healthcare DV & Explicit Treatment

```{r}
t.test(study4$hc_index[study4$timing == 2 &
                         study4$three_conditions == 0], study4$hc_index[study4$timing == 3 &
                                                                          study4$three_conditions == 0])
```

#### Experiment 1 
##### Leader DV & Implicit Treatment

```{r}
t.test(study1$leader_index[study1$timing == 2 &
                             study1$three_conditions == 1], study1$leader_index[study1$timing == 3 &
                                                                                  study1$three_conditions == 1])
```

##### Leader DV & Explicit Treatment
```{r}
t.test(study1$leader_index[study1$timing == 2 &
                             study1$three_conditions == 0], study1$leader_index[study1$timing == 3 &
                                                                                  study1$three_conditions == 0])
```

#### Experiment 4 
##### Leader DV & Implicit Treatment

```{r}
t.test(study4$leader_index[study4$timing == 2 &
                             study4$three_conditions == 1], study4$leader_index[study4$timing == 3 &
                                                                                  study4$three_conditions == 1])
```

##### Leader DV & Explicit Treatment
```{r}
t.test(study4$leader_index[study4$timing == 2 &
                             study4$three_conditions == 0], study4$leader_index[study4$timing == 3 &
                                                                                  study4$three_conditions == 0])
```

### Two-wave and pre p-value
#### Experiment 1 
##### Healthcare DV & Implicit Treatment
```{r}
t.test(study1$hc_index[study1$timing == 1 &
                         study1$three_conditions == 1], study1$hc_index[study1$timing == 2 &
                                                                          study1$three_conditions == 1])
```

##### Healthcare DV & Explicit Treatment

```{r}
t.test(study1$hc_index[study1$timing == 1 &
                         study1$three_conditions == 0], study1$hc_index[study1$timing == 2 &
                                                                          study1$three_conditions == 0])
```

#### Experiment 4
##### Healthcare DV & Implicit Treatment
```{r}
t.test(study4$hc_index[study4$timing == 1 &
                         study4$three_conditions == 1], study4$hc_index[study4$timing == 2 &
                                                                          study4$three_conditions == 1])
```

##### Healthcare DV & Explicit Treatment
```{r}
t.test(study4$hc_index[study4$timing == 1 &
                         study4$three_conditions == 0], study4$hc_index[study4$timing == 2 &
                                                                          study4$three_conditions == 0])
```

#### Experiment 1 
##### Leader DV & Implicit Treatment
```{r}
t.test(study1$leader_index[study1$timing == 1 &
                             study1$three_conditions == 1], study1$leader_index[study1$timing == 2 &
                                                                                  study1$three_conditions == 1])
```

##### Leader DV & Explicit Treatment
```{r}
t.test(study1$leader_index[study1$timing == 1 &
                             study1$three_conditions == 0], study1$leader_index[study1$timing == 2 &
                                                                                  study1$three_conditions == 0])
```

#### Experiment 4
##### Leader DV & Implicit Treatment
```{r}
t.test(study4$leader_index[study4$timing == 1 &
                             study4$three_conditions == 1], study4$leader_index[study4$timing == 2 &
                                                                                  study4$three_conditions == 1])
```
 
##### Leader DV & Explicit Treatment
```{r}
t.test(study4$leader_index[study4$timing == 1 &
                             study4$three_conditions == 0], study4$leader_index[study4$timing == 2 &
                                                                                  study4$three_conditions == 0])
```

### Two-wave and post p-value

#### Experiment 1
##### Healthcare DV & Implicit Treatment
```{r}
t.test(study1$hc_index[study1$timing == 1 &
                         study1$three_conditions == 1], study1$hc_index[study1$timing == 3 &
                                                                          study1$three_conditions == 1])
```

##### Healthcare DV & Explicit Treatment
```{r}
t.test(study1$hc_index[study1$timing == 1 &
                         study1$three_conditions == 0], study1$hc_index[study1$timing == 3 &
                                                                          study1$three_conditions == 0])
```

#### Experiment 4
##### Healthcare DV & Implicit Treatment
```{r}
t.test(study4$hc_index[study4$timing == 1 &
                         study4$three_conditions == 1], study4$hc_index[study4$timing == 3 &
                                                                          study4$three_conditions == 1])
```

##### Healthcare DV & Explicit Treatment
```{r}
t.test(study4$hc_index[study4$timing == 1 &
                         study4$three_conditions == 0], study4$hc_index[study4$timing == 3 &
                                                                          study4$three_conditions == 0])
```

#### Experiment 1
##### Leader DV & Implicit Treatment
```{r}
t.test(study1$leader_index[study1$timing == 1 &
                             study1$three_conditions == 1], study1$leader_index[study1$timing == 3 &
                                                                                  study1$three_conditions == 1])
```

##### Leader DV & Explicit Treatment
```{r}
t.test(study1$leader_index[study1$timing == 1 &
                             study1$three_conditions == 0], study1$leader_index[study1$timing == 3 &
                                                                                  study1$three_conditions == 0])
```

#### Experiment 4
##### Leader DV & Implicit Treatment
```{r}
t.test(study4$leader_index[study4$timing == 1 &
                             study4$three_conditions == 1], study4$leader_index[study4$timing == 3 &
                                                                                  study4$three_conditions == 1])
```

##### Leader DV & Explicit Treatment
```{r}
t.test(study4$leader_index[study4$timing == 1 &
                             study4$three_conditions == 0], study4$leader_index[study4$timing == 3 &
                                                                                  study4$three_conditions == 0])
```

### Same timing across treatments 
#### Experiment 1 
##### Healthcare DV

###### Pre 
```{r}
t.test(study1$hc_index[study1$timing == 2 &
                             study1$three_conditions == 0], study1$hc_index[study1$timing == 2 &
                                                                                  study1$three_conditions == 1])
```

###### Post
```{r}
t.test(study1$hc_index[study1$timing == 3 &
                             study1$three_conditions == 0], study1$hc_index[study1$timing == 3 &
                                                                                  study1$three_conditions == 1])
```

###### Two-wave
```{r}
t.test(study1$hc_index[study1$timing == 1 &
                             study1$three_conditions == 0], study1$hc_index[study1$timing == 1 &
                                                                                  study1$three_conditions == 1])
```


#### Experiment 4
##### Healthcare DV 
###### Pre
```{r}
t.test(study4$hc_index[study4$timing == 2 &
                         study4$three_conditions == 0], study4$hc_index[study4$timing == 2 &
                                                                          study4$three_conditions == 1])
```

###### Post
```{r}
t.test(study4$hc_index[study4$timing == 3 &
                         study4$three_conditions == 0], study4$hc_index[study4$timing == 3 &
                                                                          study4$three_conditions == 1])
```

###### Two-wave
```{r}
t.test(study4$hc_index[study4$timing == 1 &
                         study4$three_conditions == 0], study4$hc_index[study4$timing == 1 &
                                                                          study4$three_conditions == 1])
```

#### Experiment 1
##### Leader DV 
###### Pre
```{r}
t.test(study1$leader_index[study1$timing == 2 &
                             study1$three_conditions == 0], study1$leader_index[study1$timing == 2 &
                                                                                  study1$three_conditions == 1])
```

###### Post
```{r}
t.test(study1$leader_index[study1$timing == 3 &
                             study1$three_conditions == 0], study1$leader_index[study1$timing == 3 &
                                                                                  study1$three_conditions == 1])
```

###### Two-wave
```{r}
t.test(study1$leader_index[study1$timing == 1 &
                             study1$three_conditions == 0], study1$leader_index[study1$timing == 1 &
                                                                                  study1$three_conditions == 1])
```

#### Experiment 4
##### Leader DV 
###### Pre
```{r}
t.test(study4$leader_index[study4$timing == 2 &
                             study4$three_conditions == 0], study4$leader_index[study4$timing == 2 &
                                                                                  study4$three_conditions == 1])
```

###### Post
```{r}
t.test(study4$leader_index[study4$timing == 3 &
                             study4$three_conditions == 0], study4$leader_index[study4$timing == 3 &
                                                                                  study4$three_conditions == 1])
```

###### Two-wave
```{r}
t.test(study4$leader_index[study4$timing == 1 &
                             study4$three_conditions == 0], study4$leader_index[study4$timing == 1 &
                                                                                  study4$three_conditions == 1])
```

## H4: Low Symbolic Racism

```{r filter-low-symbolic-racism}
study1l <- study1 %>%
  filter(symrac01 < 0.5)

study4l <- study4 %>%
  filter(symrac01 < 0.5)
```

### Pre and Post P-Value
#### Experiment 1 
##### Healthcare DV & Implicit Treatment
```{r}
t.test(study1l$hc_index[study1l$timing == 2 & study1l$three_conditions == 1],
       study1l$hc_index[study1l$timing == 3 & study1l$three_conditions == 1])
```

##### Healthcare DV & Explicit Treatment
```{r}
t.test(study1l$hc_index[study1l$timing == 2 & study1l$three_conditions == 0],
       study1l$hc_index[study1l$timing == 3 & study1l$three_conditions == 0])
```

#### Experiment 4 
##### Healthcare DV & Implicit Treatment
```{r}
t.test(study4l$hc_index[study4l$timing == 2 & study4l$three_conditions == 1],
       study4l$hc_index[study4l$timing == 3 & study4l$three_conditions == 1])
```

##### Healthcare DV & Explicit Treatment
```{r}
t.test(study4l$hc_index[study4l$timing == 2 & study4l$three_conditions == 0],
       study4l$hc_index[study4l$timing == 3 & study4l$three_conditions == 0])
```

#### Experiment 1 
##### Leader DV & Implicit Treatment
```{r}
t.test(study1l$leader_index[study1l$timing == 2 & study1l$three_conditions == 1],
       study1l$leader_index[study1l$timing == 3 & study1l$three_conditions == 1])
```

##### Leader DV & Explicit Treatment
```{r}
t.test(study1l$leader_index[study1l$timing == 2 & study1l$three_conditions == 0],
       study1l$leader_index[study1l$timing == 3 & study1l$three_conditions == 0])
```

#### Experiment 4 
##### Leader DV & Implicit Treatment
```{r}
t.test(study4l$leader_index[study4l$timing == 2 & study4l$three_conditions == 1],
       study4l$leader_index[study4l$timing == 3 & study4l$three_conditions == 1])
```

##### Leader DV & Explicit Treatment
```{r}
t.test(study4l$leader_index[study4l$timing == 2 & study4l$three_conditions == 0],
       study4l$leader_index[study4l$timing == 3 & study4l$three_conditions == 0])
```

### Two-wave and Pre P-Value

#### Experiment 1 
##### Healthcare DV & Implicit Treatment
```{r}
t.test(study1l$hc_index[study1l$timing == 1 & study1l$three_conditions == 1],
       study1l$hc_index[study1l$timing == 2 & study1l$three_conditions == 1])
```

##### Healthcare DV & Explicit Treatment
```{r}
t.test(study1l$hc_index[study1l$timing == 1 & study1l$three_conditions == 0],
       study1l$hc_index[study1l$timing == 2 & study1l$three_conditions == 0])
```

#### Experiment 4
##### Healthcare DV & Implicit Treatment
```{r}
t.test(study4l$hc_index[study4l$timing == 1 & study4l$three_conditions == 1],
       study4l$hc_index[study4l$timing == 2 & study4l$three_conditions == 1])
```

##### Healthcare DV & Explicit Treatment
```{r}
t.test(study4l$hc_index[study4l$timing == 1 & study4l$three_conditions == 0],
       study4l$hc_index[study4l$timing == 2 & study4l$three_conditions == 0])
```

#### Experiment 1 
##### Leader DV & Implicit Treatment
```{r}
t.test(study1l$leader_index[study1l$timing == 1 & study1l$three_conditions == 1],
       study1l$leader_index[study1l$timing == 2 & study1l$three_conditions == 1])
```

##### Leader DV & Explicit Treatment
```{r}
t.test(study1l$leader_index[study1l$timing == 1 & study1l$three_conditions == 0],
       study1l$leader_index[study1l$timing == 2 & study1l$three_conditions == 0])
```

#### Experiment 4
##### Leader DV & Implicit Treatment
```{r}
t.test(study4l$leader_index[study4l$timing == 1 & study4l$three_conditions == 1],
       study4l$leader_index[study4l$timing == 2 & study4l$three_conditions == 1])
```

##### Leader DV & Explicit Treatment
```{r}
t.test(study4l$leader_index[study4l$timing == 1 & study4l$three_conditions == 0],
       study4l$leader_index[study4l$timing == 2 & study4l$three_conditions == 0])
```

### Two-Wave and Post P-Value

#### Experiment 1
##### Healthcare DV & Implicit Treatment
```{r study1-hc-implicit-2wavepost}
t.test(study1l$hc_index[study1l$timing == 1 & study1l$three_conditions == 1],
       study1l$hc_index[study1l$timing == 3 & study1l$three_conditions == 1])
```

##### Healthcare DV & Explicit Treatment
```{r study1-hc-explicit-2wavepost}
t.test(study1l$hc_index[study1l$timing == 1 & study1l$three_conditions == 0],
       study1l$hc_index[study1l$timing == 3 & study1l$three_conditions == 0])
```

#### Experiment 4 
##### Leader DV & Implicit Treatment
```{r}
t.test(study4l$hc_index[study4l$timing == 1 & study4l$three_conditions == 1],
       study4l$hc_index[study4l$timing == 3 & study4l$three_conditions == 1])
```

##### Leader DV & Explicit Treatment
```{r}
t.test(study4l$hc_index[study4l$timing == 1 & study4l$three_conditions == 0],
       study4l$hc_index[study4l$timing == 3 & study4l$three_conditions == 0])
```

#### Experiment 1
##### Leader DV & Implicit Treatment
```{r}
t.test(study1l$leader_index[study1l$timing == 1 & study1l$three_conditions == 1],
       study1l$leader_index[study1l$timing == 3 & study1l$three_conditions == 1])
```

##### Leader DV & Explicit Treatment
```{r}
t.test(study1l$leader_index[study1l$timing == 1 & study1l$three_conditions == 0],
       study1l$leader_index[study1l$timing == 3 & study1l$three_conditions == 0])
```

#### Experiment 4 
##### Leader DV & Implicit Treatment
```{r}
t.test(study4l$leader_index[study4l$timing == 1 & study4l$three_conditions == 1],
       study4l$leader_index[study4l$timing == 3 & study4l$three_conditions == 1])
```

##### Leader DV & Explicit Treatment
```{r}
t.test(study4l$leader_index[study4l$timing == 1 & study4l$three_conditions == 0],
       study4l$leader_index[study4l$timing == 3 & study4l$three_conditions == 0])
```

## H4: High Symbolic Racism

```{r filter-high-symbolic-racism}
study1h <- study1 %>%
  filter(symrac01 >= 0.5)

study4h <- study4 %>%
  filter(symrac01 >= 0.5)
```

### Pre and Post P-Value

#### Experiment 1 
##### Healthcare DV & Implicit Treatment
```{r study1h-hc-implicit-prepost}
t.test(study1h$hc_index[study1h$timing == 2 & study1h$three_conditions == 1],
       study1h$hc_index[study1h$timing == 3 & study1h$three_conditions == 1])
```

##### Healthcare DV & Explicit Treatment
```{r study1h-hc-explicit-prepost}
t.test(study1h$hc_index[study1h$timing == 2 & study1h$three_conditions == 0],
       study1h$hc_index[study1h$timing == 3 & study1h$three_conditions == 0])
```

#### Experiment 4 
##### Healthcare DV & Implicit Treatment
```{r study4h-hc-implicit-prepost}
t.test(study4h$hc_index[study4h$timing == 2 & study4h$three_conditions == 1],
       study4h$hc_index[study4h$timing == 3 & study4h$three_conditions == 1])
```

##### Healthcare DV & Explicit Treatment
```{r study4h-hc-explicit-prepost}
t.test(study4h$hc_index[study4h$timing == 2 & study4h$three_conditions == 0],
       study4h$hc_index[study4h$timing == 3 & study4h$three_conditions == 0])
```

#### Experiment 1 
##### Leader DV & Implicit Treatment
```{r study1h-leader-implicit-prepost}
t.test(study1h$leader_index[study1h$timing == 2 & study1h$three_conditions == 1],
       study1h$leader_index[study1h$timing == 3 & study1h$three_conditions == 1])
```

##### Leader DV & Explicit Treatment
```{r study1h-leader-explicit-prepost}
t.test(study1h$leader_index[study1h$timing == 2 & study1h$three_conditions == 0],
       study1h$leader_index[study1h$timing == 3 & study1h$three_conditions == 0])
```

#### Experiment 4
##### Leader DV & Implicit Treatment
```{r study4h-leader-implicit-prepost}
t.test(study4h$leader_index[study4h$timing == 2 & study4h$three_conditions == 1],
       study4h$leader_index[study4h$timing == 3 & study4h$three_conditions == 1])
```

##### Leader DV & Explicit Treatment
```{r study4h-leader-explicit-prepost}
t.test(study4h$leader_index[study4h$timing == 2 & study4h$three_conditions == 0],
       study4h$leader_index[study4h$timing == 3 & study4h$three_conditions == 0])
```

### Two-Wave and Pre P-Value

#### Experiment 1 
##### Healthcare DV & Implicit Treatment
```{r study1h-hc-implicit-2wavepre}
t.test(study1h$hc_index[study1h$timing == 1 & study1h$three_conditions == 1],
       study1h$hc_index[study1h$timing == 2 & study1h$three_conditions == 1])
```

##### Healthcare DV & Explicit Treatment
```{r study1h-hc-explicit-2wavepre}
t.test(study1h$hc_index[study1h$timing == 1 & study1h$three_conditions == 0],
       study1h$hc_index[study1h$timing == 2 & study1h$three_conditions == 0])
```

#### Experiment 4 
##### Healthcare DV & Implicit Treatment
```{r study4h-hc-implicit-2wavepre}
t.test(study4h$hc_index[study4h$timing == 1 & study4h$three_conditions == 1],
       study4h$hc_index[study4h$timing == 2 & study4h$three_conditions == 1])
```

##### Healthcare DV & Explicit Treatment
```{r study4h-hc-explicit-2wavepre}
t.test(study4h$hc_index[study4h$timing == 1 & study4h$three_conditions == 0],
       study4h$hc_index[study4h$timing == 2 & study4h$three_conditions == 0])
```

#### Experiment 1
##### Leader DV & Implicit Treatment
```{r study1h-leader-implicit-2wavepre}
t.test(study1h$leader_index[study1h$timing == 1 & study1h$three_conditions == 1],
       study1h$leader_index[study1h$timing == 2 & study1h$three_conditions == 1])
```

##### Leader DV & Explicit Treatment
```{r study1h-leader-explicit-2wavepre}
t.test(study1h$leader_index[study1h$timing == 1 & study1h$three_conditions == 0],
       study1h$leader_index[study1h$timing == 2 & study1h$three_conditions == 0])
```

#### Experiment 4 
##### Leader DV & Implicit Treatment
```{r study4h-leader-implicit-2wavepre}
t.test(study4h$leader_index[study4h$timing == 1 & study4h$three_conditions == 1],
       study4h$leader_index[study4h$timing == 2 & study4h$three_conditions == 1])
```

##### Leader DV & Explicit Treatment
```{r study4h-leader-explicit-2wavepre}
t.test(study4h$leader_index[study4h$timing == 1 & study4h$three_conditions == 0],
       study4h$leader_index[study4h$timing == 2 & study4h$three_conditions == 0])
```


### Two-wave and Post P-Value

#### Experiment 1 
##### Healthcare DV & Implicit Treatment
```{r study1h-hc-implicit-2wavepost}
t.test(study1h$hc_index[study1h$timing == 1 & study1h$three_conditions == 1],
       study1h$hc_index[study1h$timing == 3 & study1h$three_conditions == 1])
```

##### Healthcare DV & Explicit Treatment
```{r study1h-hc-explicit-2wavepost}
t.test(study1h$hc_index[study1h$timing == 1 & study1h$three_conditions == 0],
       study1h$hc_index[study1h$timing == 3 & study1h$three_conditions == 0])
```

#### Experiment 4 
##### Healthcare DV & Implicit Treatment
```{r study4h-hc-implicit-2wavepost}
t.test(study4h$hc_index[study4h$timing == 1 & study4h$three_conditions == 1],
       study4h$hc_index[study4h$timing == 3 & study4h$three_conditions == 1])
```

##### Healthcare DV & Explicit Treatment
```{r study4h-hc-explicit-2wavepost}
t.test(study4h$hc_index[study4h$timing == 1 & study4h$three_conditions == 0],
       study4h$hc_index[study4h$timing == 3 & study4h$three_conditions == 0])
```

#### Experiment 1 
##### Leader DV & Implicit Treatment
```{r study1h-leader-implicit-2wavepost}
t.test(study1h$leader_index[study1h$timing == 1 & study1h$three_conditions == 1],
       study1h$leader_index[study1h$timing == 3 & study1h$three_conditions == 1])
```

##### Leader DV & Explicit Treatment
```{r study1h-leader-explicit-2wavepost}
t.test(study1h$leader_index[study1h$timing == 1 & study1h$three_conditions == 0],
       study1h$leader_index[study1h$timing == 3 & study1h$three_conditions == 0])
```

#### Experiment 4 
##### Leader DV & Implicit Treatment
```{r study4h-leader-implicit-2wavepost}
t.test(study4h$leader_index[study4h$timing == 1 & study4h$three_conditions == 1],
       study4h$leader_index[study4h$timing == 3 & study4h$three_conditions == 1])
```

##### Leader DV & Explicit Treatment
```{r study4h-leader-explicit-2wavepost}
t.test(study4h$leader_index[study4h$timing == 1 & study4h$three_conditions == 0],
       study4h$leader_index[study4h$timing == 3 & study4h$three_conditions == 0])
```


# Equivalence Test 

## H1: Symbolic Racism

### Experiment 1 - Pre vs Post Timing
```{r study1-symrac-prepost-equivalence}
equiv.t.test(study1$symrac01[study1$timing == 2],
             study1$symrac01[study1$timing == 3],
             eps_std = 0.20) %>% summary()
```

### Experiment 4 - Pre vs Post Timing
```{r study4-symrac-prepost-equivalence}
equiv.t.test(study4$symrac01[study4$timing == 2],
             study4$symrac01[study4$timing == 3],
             eps_std = 0.10) %>% summary()
```

### Experiment 1 - Two-wave vs Pre Timing
```{r study1-symrac-2wavepre-equivalence}
equiv.t.test(study1$symrac01[study1$timing == 1],
             study1$symrac01[study1$timing == 2],
             eps_std = 0.10) %>% summary()
```

### Experiment 4 - Two-wave vs Pre Timing
```{r study4-symrac-2wavepre-equivalence}
equiv.t.test(study4$symrac01[study4$timing == 1],
             study4$symrac01[study4$timing == 2],
             eps_std = 0.12) %>% summary()
```

### Experiment 1 - Two-wave vs Post Timing
```{r study1-symrac-2wavepost-equivalence}
equiv.t.test(study1$symrac01[study1$timing == 1],
             study1$symrac01[study1$timing == 3],
             eps_std = 0.18) %>% summary()
```

### Experiment 4 - Two-wave vs Post Timing
```{r study4-symrac-2wavepost-equivalence}
equiv.t.test(study4$symrac01[study4$timing == 1],
             study4$symrac01[study4$timing == 3],
             eps_std = 0.10) %>% summary()
```


## Equivalence Tests: Healthcare and Leader Indices (H2)

### Experiment 1 - Healthcare Pre vs Post
```{r study1-hc-prepost-equivalence}
equiv.t.test(study1$hc_index[study1$timing == 2],
             study1$hc_index[study1$timing == 3],
             eps_std = 0.11) %>% summary()
```

### Experiment 4 - Healthcare Pre vs Post
```{r study4-hc-prepost-equivalence}
equiv.t.test(study4$hc_index[study4$timing == 2],
             study4$hc_index[study4$timing == 3],
             eps_std = 0.16) %>% summary()
```

### Experiment 1 - Leader Pre vs Post
```{r study1-leader-prepost-equivalence}
equiv.t.test(study1$leader_index[study1$timing == 2],
             study1$leader_index[study1$timing == 3],
             eps_std = 0.04) %>% summary()
```

### Experiment 4 - Leader Pre vs Post
```{r study4-leader-prepost-equivalence}
equiv.t.test(study4$leader_index[study4$timing == 2],
             study4$leader_index[study4$timing == 3],
             eps_std = 0.12) %>% summary()
```

### Experiment 1 - Healthcare Two-wave vs Pre
```{r study1-hc-2wavepre-equivalence}
equiv.t.test(study1$hc_index[study1$timing == 1],
             study1$hc_index[study1$timing == 2],
             eps_std = 0.10) %>% summary()
```

### Experiment 4 - Healthcare Two-wave vs Pre
```{r study4-hc-2wavepre-equivalence}
equiv.t.test(study4$hc_index[study4$timing == 1],
             study4$hc_index[study4$timing == 2],
             eps_std = 0.03) %>% summary()
```

### Experiment 1 - Leader Two-wave vs Pre
```{r study1-leader-2wavepre-equivalence}
equiv.t.test(study1$leader_index[study1$timing == 1],
             study1$leader_index[study1$timing == 2],
             eps_std = 0.09) %>% summary()
```

### Experiment 4 - Leader Two-wave vs Pre
```{r study4-leader-2wavepre-equivalence}
equiv.t.test(study4$leader_index[study4$timing == 1],
             study4$leader_index[study4$timing == 2],
             eps_std = 0.08) %>% summary()
```

### Experiment 1 - Healthcare Two-wave vs Post
```{r study1-hc-2wavepost-equivalence}
equiv.t.test(study1$hc_index[study1$timing == 1],
             study1$hc_index[study1$timing == 3],
             eps_std = 0.01) %>% summary()
```

### Experiment 4 - Healthcare Two-wave vs Post
```{r study4-hc-2wavepost-equivalence}
equiv.t.test(study4$hc_index[study4$timing == 1],
             study4$hc_index[study4$timing == 3],
             eps_std = 0.16) %>% summary()
```

### Experiment 1 - Leader Two-wave vs Post
```{r study1-leader-2wavepost-equivalence}
equiv.t.test(study1$leader_index[study1$timing == 1],
             study1$leader_index[study1$timing == 3],
             eps_std = 0.04) %>% summary()
```

### Experiment 4 - Leader Two-wave vs Post
```{r study4-leader-2wavepost-equivalence}
equiv.t.test(study4$leader_index[study4$timing == 1],
             study4$leader_index[study4$timing == 3],
             eps_std = 0.10) %>% summary()
```

## H3 - By Treatment (Implicit vs Explicit)

### Experiment 1 - Healthcare Pre vs Post (Implicit)
```{r study1-h3-hc-implicit-prepost}
equiv.t.test(study1$hc_index[study1$timing == 2 & study1$three_conditions == 1],
             study1$hc_index[study1$timing == 3 & study1$three_conditions == 1],
             eps_std = 0.22) %>% summary()
```

### Experiment 1 - Healthcare Pre vs Post (Explicit)
```{r study1-h3-hc-explicit-prepost}
equiv.t.test(study1$hc_index[study1$timing == 2 & study1$three_conditions == 0],
             study1$hc_index[study1$timing == 3 & study1$three_conditions == 0],
             eps_std = 0.18) %>% summary()
```

### Experiment 4 - Healthcare Pre vs Post (Implicit)
```{r study4-h3-hc-implicit-prepost}
equiv.t.test(study4$hc_index[study4$timing == 2 & study4$three_conditions == 1],
             study4$hc_index[study4$timing == 3 & study4$three_conditions == 1],
             eps_std = 0.20) %>% summary()
```

### Experiment 4 - Healthcare Pre vs Post (Explicit)
```{r study4-h3-hc-explicit-prepost}
equiv.t.test(study4$hc_index[study4$timing == 2 & study4$three_conditions == 0],
             study4$hc_index[study4$timing == 3 & study4$three_conditions == 0],
             eps_std = 0.20) %>% summary()
```

### Experiment 1 - Leader Pre vs Post (Implicit)
```{r study1-h3-leader-implicit-prepost}
equiv.t.test(study1$leader_index[study1$timing == 2 & study1$three_conditions == 1],
             study1$leader_index[study1$timing == 3 & study1$three_conditions == 1],
             eps_std = 0.17) %>% summary()
```

### Experiment 1 - Leader Pre vs Post (Explicit)
```{r study1-h3-leader-explicit-prepost}
equiv.t.test(study1$leader_index[study1$timing == 2 & study1$three_conditions == 0],
             study1$leader_index[study1$timing == 3 & study1$three_conditions == 0],
             eps_std = 0.18) %>% summary()
```

### Experiment 4 - Leader Pre vs Post (Implicit)
```{r study4-h3-leader-implicit-prepost}
equiv.t.test(study4$leader_index[study4$timing == 2 & study4$three_conditions == 1],
             study4$leader_index[study4$timing == 3 & study4$three_conditions == 1],
             eps_std = 0.20) %>% summary()
```

### Experiment 4 - Leader Pre vs Post (Explicit)
```{r study4-h3-leader-explicit-prepost}
equiv.t.test(study4$leader_index[study4$timing == 2 & study4$three_conditions == 0],
             study4$leader_index[study4$timing == 3 & study4$three_conditions == 0],
             eps_std = 0.10) %>% summary()
```

## H3 - Two-wave vs Pre Timing

### Experiment 1 - Healthcare (Implicit)
```{r study1-h3-hc-implicit-2wavepre}
equiv.t.test(study1$hc_index[study1$timing == 1 & study1$three_conditions == 1],
             study1$hc_index[study1$timing == 2 & study1$three_conditions == 1],
             eps_std = 0.21) %>% summary()
```

### Experiment 1 - Healthcare (Explicit)
```{r study1-h3-hc-explicit-2wavepre}
equiv.t.test(study1$hc_index[study1$timing == 1 & study1$three_conditions == 0],
             study1$hc_index[study1$timing == 2 & study1$three_conditions == 0],
             eps_std = 0.18) %>% summary()
```

### Experiment 4 - Healthcare (Implicit)
```{r study4-h3-hc-implicit-2wavepre}
equiv.t.test(study4$hc_index[study4$timing == 1 & study4$three_conditions == 1],
             study4$hc_index[study4$timing == 2 & study4$three_conditions == 1],
             eps_std = 0.11) %>% summary()
```

### Experiment 4 - Healthcare (Explicit)
```{r study4-h3-hc-explicit-2wavepre}
equiv.t.test(study4$hc_index[study4$timing == 1 & study4$three_conditions == 0],
             study4$hc_index[study4$timing == 2 & study4$three_conditions == 0],
             eps_std = 0.07) %>% summary()
```

### Experiment 1 - Leader (Implicit)
```{r study1-h3-leader-implicit-2wavepre}
equiv.t.test(study1$leader_index[study1$timing == 1 & study1$three_conditions == 1],
             study1$leader_index[study1$timing == 2 & study1$three_conditions == 1],
             eps_std = 0.15) %>% summary()
```

### Experiment 1 - Leader (Explicit)
```{r study1-h3-leader-explicit-2wavepre}
equiv.t.test(study1$leader_index[study1$timing == 1 & study1$three_conditions == 0],
             study1$leader_index[study1$timing == 2 & study1$three_conditions == 0],
             eps_std = 0.18) %>% summary()
```

### Experiment 4 - Leader (Implicit)
```{r study4-h3-leader-implicit-2wavepre}
equiv.t.test(study4$leader_index[study4$timing == 1 & study4$three_conditions == 1],
             study4$leader_index[study4$timing == 2 & study4$three_conditions == 1],
             eps_std = 0.16) %>% summary()
```

### Experiment 4 - Leader (Explicit)
```{r study4-h3-leader-explicit-2wavepre}
equiv.t.test(study4$leader_index[study4$timing == 1 & study4$three_conditions == 0],
             study4$leader_index[study4$timing == 2 & study4$three_conditions == 0],
             eps_std = 0.14) %>% summary()
```

## H3 - Two-wave vs Post Timing

### Experiment 1 - Healthcare (Implicit)
```{r study1-h3-hc-implicit-2wavepost}
equiv.t.test(study1$hc_index[study1$timing == 1 & study1$three_conditions == 1],
             study1$hc_index[study1$timing == 3 & study1$three_conditions == 1],
             eps_std = 0.08) %>% summary()
```

### Experiment 1 - Healthcare (Explicit)
```{r study1-h3-hc-explicit-2wavepost}
equiv.t.test(study1$hc_index[study1$timing == 1 & study1$three_conditions == 0],
             study1$hc_index[study1$timing == 3 & study1$three_conditions == 0],
             eps_std = 0.01) %>% summary()
```

### Experiment 4 - Healthcare (Implicit)
```{r study4-h3-hc-implicit-2wavepost}
equiv.t.test(study4$hc_index[study4$timing == 1 & study4$three_conditions == 1],
             study4$hc_index[study4$timing == 3 & study4$three_conditions == 1],
             eps_std = 0.18) %>% summary()
```

### Experiment 4 - Healthcare (Explicit)
```{r study4-h3-hc-explicit-2wavepost}
equiv.t.test(study4$hc_index[study4$timing == 1 & study4$three_conditions == 0],
             study4$hc_index[study4$timing == 3 & study4$three_conditions == 0],
             eps_std = 0.20) %>% summary()
```

### Experiment 1 - Leader (Implicit)
```{r study1-h3-leader-implicit-2wavepost}
equiv.t.test(study1$leader_index[study1$timing == 1 & study1$three_conditions == 1],
             study1$leader_index[study1$timing == 3 & study1$three_conditions == 1],
             eps_std = 0.11) %>% summary()
```

### Experiment 1 - Leader (Explicit)
```{r study1-h3-leader-explicit-2wavepost}
equiv.t.test(study1$leader_index[study1$timing == 1 & study1$three_conditions == 0],
             study1$leader_index[study1$timing == 3 & study1$three_conditions == 0],
             eps_std = 0.01) %>% summary()
```

### Experiment 4 - Leader (Implicit)
```{r study4-h3-leader-implicit-2wavepost}
equiv.t.test(study4$leader_index[study4$timing == 1 & study4$three_conditions == 1],
             study4$leader_index[study4$timing == 3 & study4$three_conditions == 1],
             eps_std = 0.14) %>% summary()
```

### Experiment 4 - Leader (Explicit)
```{r study4-h3-leader-explicit-2wavepost}
equiv.t.test(study4$leader_index[study4$timing == 1 & study4$three_conditions == 0],
             study4$leader_index[study4$timing == 3 & study4$three_conditions == 0],
             eps_std = 0.11) %>% summary()
```

## H3 - Same timing across treatments
### Experiment 1 - Healthcare (Timing = Pre)
```{r}
equiv.t.test(study1$hc_index[study1$timing == 2 &
                         study1$three_conditions == 0], study1$hc_index[study1$timing == 2 &
                                                                          study1$three_conditions == 1], eps_std = 0.18) %>% summary()
```

### Experiment 1 - Healthcare (Timing = Post)
```{r}
equiv.t.test(study1$hc_index[study1$timing == 3 &
                         study1$three_conditions == 0], study1$hc_index[study1$timing == 3 &
                                                                          study1$three_conditions == 1], eps_std = 0.22) %>% summary()
```

### Experiment 1 - Healthcare (Timing = Two-wave)
```{r}
equiv.t.test(study1$hc_index[study1$timing == 1 &
                         study1$three_conditions == 0], study1$hc_index[study1$timing == 1 &
                                                                          study1$three_conditions == 1], eps_std = 0.21) %>% summary()
```

### Experiment 4 - Healthcare (Timing = Pre)
```{r}
equiv.t.test(study4$hc_index[study4$timing == 2 &
                         study4$three_conditions == 0], study4$hc_index[study4$timing == 2 &
                                                                          study4$three_conditions == 1], eps_std = 0.14) %>% summary()
```

### Experiment 4 - Healthcare (Timing = Post)
```{r}
equiv.t.test(study4$hc_index[study4$timing == 3 &
                         study4$three_conditions == 0], study4$hc_index[study4$timing == 3 &
                                                                          study4$three_conditions == 1], eps_std = 0.13) %>% summary()
```

### Experiment 4 - Healthcare (Timing = Two-wave)
```{r}
equiv.t.test(study4$hc_index[study4$timing == 1 &
                         study4$three_conditions == 0], study4$hc_index[study4$timing == 1 &
                                                                          study4$three_conditions == 1], eps_std = 0.05) %>% summary()
```


### Experiment 1 - Leader (Timing = Pre)
```{r}
equiv.t.test(study1$leader_index[study1$timing == 2 &
                             study1$three_conditions == 0], study1$leader_index[study1$timing == 2 &
                                                                                  study1$three_conditions == 1], eps_std = 0.17) %>% summary() 
```

### Experiment 1 - Leader (Timing = Post)
```{r}
equiv.t.test(study1$leader_index[study1$timing == 3 &
                             study1$three_conditions == 0], study1$leader_index[study1$timing == 3 &
                                                                                  study1$three_conditions == 1], eps_std = 0.17) %>% summary()
```

### Experiment 1 - Leader (Timing = Two-wave)
```{r}
equiv.t.test(study1$leader_index[study1$timing == 1 &
                             study1$three_conditions == 0], study1$leader_index[study1$timing == 1 &
                                                                                  study1$three_conditions == 1], eps_std = 0.15) %>% summary() 
```

### Experiment 4 - Leader (Timing = Pre)

```{r}
equiv.t.test(study4$leader_index[study4$timing == 2 &
                             study4$three_conditions == 0], study4$leader_index[study4$timing == 2 &
                                                                                  study4$three_conditions == 1], eps_std = 0.09) %>% summary()
```

### Experiment 4 - Leader (Timing = Post)
```{r}
equiv.t.test(study4$leader_index[study4$timing == 3 &
                             study4$three_conditions == 0], study4$leader_index[study4$timing == 3 &
                                                                                  study4$three_conditions == 1], eps_std = 0.20) %>% summary()
```

### Experiment 4 - Leader (Timing = Two-wave)
```{r}
equiv.t.test(study4$leader_index[study4$timing == 1 &
                             study4$three_conditions == 0], study4$leader_index[study4$timing == 1 &
                                                                                  study4$three_conditions == 1], eps_std = 0.18) %>% summary()
```


## H4 - Low Symbolic Racism

### Filter Data
```{r filter-low-symrac}
study1l <- study1 %>%
  filter(symrac01 < 0.5)

study4l <- study4 %>%
  filter(symrac01 < 0.5)
```

### Experiment 1 - Healthcare Pre vs Post (Implicit)
```{r study1l-hc-implicit-prepost}
equiv.t.test(study1l$hc_index[study1l$timing == 2 & study1l$three_conditions == 1],
             study1l$hc_index[study1l$timing == 3 & study1l$three_conditions == 1],
             eps_std = 0.36) %>% summary()
```

### Experiment 1 - Healthcare Pre vs Post (Explicit)
```{r study1l-hc-explicit-prepost}
equiv.t.test(study1l$hc_index[study1l$timing == 2 & study1l$three_conditions == 0],
             study1l$hc_index[study1l$timing == 3 & study1l$three_conditions == 0],
             eps_std = 0.58) %>% summary()
```

### Experiment 4 - Healthcare Pre vs Post (Implicit)
```{r study4l-hc-implicit-prepost}
equiv.t.test(study4l$hc_index[study4l$timing == 2 & study4l$three_conditions == 1],
             study4l$hc_index[study4l$timing == 3 & study4l$three_conditions == 1],
             eps_std = 0.33) %>% summary()
```

### Experiment 4 - Healthcare Pre vs Post (Explicit)
```{r study4l-hc-explicit-prepost}
equiv.t.test(study4l$hc_index[study4l$timing == 2 & study4l$three_conditions == 0],
             study4l$hc_index[study4l$timing == 3 & study4l$three_conditions == 0],
             eps_std = 0.41) %>% summary()
```

### Experiment 1 - Leader Pre vs Post (Implicit)
```{r study1l-leader-implicit-prepost}
equiv.t.test(study1l$leader_index[study1l$timing == 2 & study1l$three_conditions == 1],
             study1l$leader_index[study1l$timing == 3 & study1l$three_conditions == 1],
             eps_std = 0.17) %>% summary()
```

### Experiment 1 - Leader Pre vs Post (Explicit)
```{r study1l-leader-explicit-prepost}
equiv.t.test(study1l$leader_index[study1l$timing == 2 & study1l$three_conditions == 0],
             study1l$leader_index[study1l$timing == 3 & study1l$three_conditions == 0],
             eps_std = 0.58) %>% summary()
```

### Experiment 4 - Leader Pre vs Post (Implicit)
```{r study4l-leader-implicit-prepost}
equiv.t.test(study4l$leader_index[study4l$timing == 2 & study4l$three_conditions == 1],
             study4l$leader_index[study4l$timing == 3 & study4l$three_conditions == 1],
             eps_std = 0.36) %>% summary()
```

### Experiment 4 - Leader Pre vs Post (Explicit)
```{r study4l-leader-explicit-prepost}
equiv.t.test(study4l$leader_index[study4l$timing == 2 & study4l$three_conditions == 0],
             study4l$leader_index[study4l$timing == 3 & study4l$three_conditions == 0],
             eps_std = 0.38) %>% summary()
```


### Experiment 1 - Healthcare Two-wave vs Pre (Implicit)
```{r study1l-hc-implicit-2wavepre}
equiv.t.test(study1l$hc_index[study1l$timing == 1 & study1l$three_conditions == 1],
             study1l$hc_index[study1l$timing == 2 & study1l$three_conditions == 1],
             eps_std = 0.48) %>% summary()
```

### Experiment 1 - Healthcare Two-wave vs Pre (Explicit)
```{r study1l-hc-explicit-2wavepre}
equiv.t.test(study1l$hc_index[study1l$timing == 1 & study1l$three_conditions == 0],
             study1l$hc_index[study1l$timing == 2 & study1l$three_conditions == 0],
             eps_std = 0.27) %>% summary()
```

### Experiment 4 - Healthcare Two-wave vs Pre (Implicit)
```{r study4l-hc-implicit-2wavepre}
equiv.t.test(study4l$hc_index[study4l$timing == 1 & study4l$three_conditions == 1],
             study4l$hc_index[study4l$timing == 2 & study4l$three_conditions == 1],
             eps_std = 0.58) %>% summary()
```

### Experiment 4 - Healthcare Two-wave vs Pre (Explicit)
```{r study4l-hc-explicit-2wavepre}
equiv.t.test(study4l$hc_index[study4l$timing == 1 & study4l$three_conditions == 0],
             study4l$hc_index[study4l$timing == 2 & study4l$three_conditions == 0],
             eps_std = 0.38) %>% summary()
```

### Experiment 1 - Leader Two-wave vs Pre (Implicit)
```{r study1l-leader-implicit-2wavepre}
equiv.t.test(study1l$leader_index[study1l$timing == 1 & study1l$three_conditions == 1],
             study1l$leader_index[study1l$timing == 2 & study1l$three_conditions == 1],
             eps_std = 0.36) %>% summary()
```

### Experiment 1 - Leader Two-wave vs Pre (Explicit)
```{r study1l-leader-explicit-2wavepre}
equiv.t.test(study1l$leader_index[study1l$timing == 1 & study1l$three_conditions == 0],
             study1l$leader_index[study1l$timing == 2 & study1l$three_conditions == 0],
             eps_std = 0.01) %>% summary()
```

### Experiment 4 - Leader Two-wave vs Pre (Implicit)
```{r study4l-leader-implicit-2wavepre}
equiv.t.test(study4l$leader_index[study4l$timing == 1 & study4l$three_conditions == 1],
             study4l$leader_index[study4l$timing == 2 & study4l$three_conditions == 1],
             eps_std = 0.41) %>% summary()
```

### Experiment 4 - Leader Two-wave vs Pre (Explicit)
```{r study4l-leader-explicit-2wavepre}
equiv.t.test(study4l$leader_index[study4l$timing == 1 & study4l$three_conditions == 0],
             study4l$leader_index[study4l$timing == 2 & study4l$three_conditions == 0],
             eps_std = 0.40) %>% summary()
```

### Experiment 1 - Healthcare Two-wave vs Post (Implicit)
```{r study1l-hc-implicit-2wavepost}
equiv.t.test(study1l$hc_index[study1l$timing == 1 & study1l$three_conditions == 1],
             study1l$hc_index[study1l$timing == 3 & study1l$three_conditions == 1],
             eps_std = 0.40) %>% summary()
```

### Experiment 1 - Healthcare Two-wave vs Post (Explicit)
```{r study1l-hc-explicit-2wavepost}
equiv.t.test(study1l$hc_index[study1l$timing == 1 & study1l$three_conditions == 0],
             study1l$hc_index[study1l$timing == 3 & study1l$three_conditions == 0],
             eps_std = 0.59) %>% summary()
```

### Experiment 4 - Healthcare Two-wave vs Post (Implicit)
```{r study4l-hc-implicit-2wavepost}
equiv.t.test(study4l$hc_index[study4l$timing == 1 & study4l$three_conditions == 1],
             study4l$hc_index[study4l$timing == 3 & study4l$three_conditions == 1],
             eps_std = 0.68) %>% summary()
```

### Experiment 4 - Healthcare Two-wave vs Post (Explicit)
```{r study4l-hc-explicit-2wavepost}
equiv.t.test(study4l$hc_index[study4l$timing == 1 & study4l$three_conditions == 0],
             study4l$hc_index[study4l$timing == 3 & study4l$three_conditions == 0],
             eps_std = 0.26) %>% summary()
```

### Experiment 1 - Leader Two-wave vs Post (Implicit)
```{r study1l-leader-implicit-2wavepost}
equiv.t.test(study1l$leader_index[study1l$timing == 1 & study1l$three_conditions == 1],
             study1l$leader_index[study1l$timing == 3 & study1l$three_conditions == 1],
             eps_std = 0.39) %>% summary()
```

### Experiment 1 - Leader Two-wave vs Post (Explicit)
```{r study1l-leader-explicit-2wavepost}
equiv.t.test(study1l$leader_index[study1l$timing == 1 & study1l$three_conditions == 0],
             study1l$leader_index[study1l$timing == 3 & study1l$three_conditions == 0],
             eps_std = 0.57) %>% summary()
```

### Experiment 4 - Leader Two-wave vs Post (Implicit)
```{r study4l-leader-implicit-2wavepost}
equiv.t.test(study4l$leader_index[study4l$timing == 1 & study4l$three_conditions == 1],
             study4l$leader_index[study4l$timing == 3 & study4l$three_conditions == 1],
             eps_std = 0.53) %>% summary()
```

### Experiment 4 - Leader Two-wave vs Post (Explicit)
```{r study4l-leader-explicit-2wavepost}
equiv.t.test(study4l$leader_index[study4l$timing == 1 & study4l$three_conditions == 0],
             study4l$leader_index[study4l$timing == 3 & study4l$three_conditions == 0],
             eps_std = 0.19) %>% summary()
```

## H4 - Low Symbolic Racism: Same Timing Across Conditions

### Experiment 1 - Healthcare (Timing = Pre)
```{r study1l-hc-t2-explicit-vs-implicit}
equiv.t.test(study1l$hc_index[study1l$timing == 2 & study1l$three_conditions == 0],
             study1l$hc_index[study1l$timing == 2 & study1l$three_conditions == 1],
             eps_std = 0.22) %>% summary()
```

### Experiment 1 - Healthcare (Timing = Post)
```{r study1l-hc-t3-explicit-vs-implicit}
equiv.t.test(study1l$hc_index[study1l$timing == 3 & study1l$three_conditions == 0],
             study1l$hc_index[study1l$timing == 3 & study1l$three_conditions == 1],
             eps_std = 0.46) %>% summary()
```

### Experiment 1 - Healthcare (Timing = Two-wave)
```{r study1l-hc-t1-explicit-vs-implicit}
equiv.t.test(study1l$hc_index[study1l$timing == 1 & study1l$three_conditions == 0],
             study1l$hc_index[study1l$timing == 1 & study1l$three_conditions == 1],
             eps_std = 0.54) %>% summary()
```

### Experiment 4 - Healthcare (Timing = Pre)
```{r study4l-hc-t2-explicit-vs-implicit}
equiv.t.test(study4l$hc_index[study4l$timing == 2 & study4l$three_conditions == 0],
             study4l$hc_index[study4l$timing == 2 & study4l$three_conditions == 1],
             eps_std = 0.44) %>% summary()
```

### Experiment 4 - Healthcare (Timing = Post)
```{r study4l-hc-t3-explicit-vs-implicit}
equiv.t.test(study4l$hc_index[study4l$timing == 3 & study4l$three_conditions == 0],
             study4l$hc_index[study4l$timing == 3 & study4l$three_conditions == 1],
             eps_std = 0.34) %>% summary()
```

### Experiment 4 - Healthcare (Timing = Two-wave)
```{r study4l-hc-t1-explicit-vs-implicit}
equiv.t.test(study4l$hc_index[study4l$timing == 1 & study4l$three_conditions == 0],
             study4l$hc_index[study4l$timing == 1 & study4l$three_conditions == 1],
             eps_std = 0.52) %>% summary()
```

### Experiment 1 - Leader (Timing = Pre)
```{r study1l-leader-t2-explicit-vs-implicit}
equiv.t.test(study1l$leader_index[study1l$timing == 2 & study1l$three_conditions == 0],
             study1l$leader_index[study1l$timing == 2 & study1l$three_conditions == 1],
             eps_std = 0.42) %>% summary()
```

### Experiment 1 - Leader (Timing = Post)
```{r study1l-leader-t3-explicit-vs-implicit}
equiv.t.test(study1l$leader_index[study1l$timing == 3 & study1l$three_conditions == 0],
             study1l$leader_index[study1l$timing == 3 & study1l$three_conditions == 1],
             eps_std = 0.45) %>% summary()
```

### Experiment 1 - Leader (Timing = Two-wave)
```{r study1l-leader-t1-explicit-vs-implicit}
equiv.t.test(study1l$leader_index[study1l$timing == 1 & study1l$three_conditions == 0],
             study1l$leader_index[study1l$timing == 1 & study1l$three_conditions == 1],
             eps_std = 0.51) %>% summary()
```

### Experiment 4 - Leader (Timing = Pre)
```{r study4l-leader-t2-explicit-vs-implicit}
equiv.t.test(study4l$leader_index[study4l$timing == 2 & study4l$three_conditions == 0],
             study4l$leader_index[study4l$timing == 2 & study4l$three_conditions == 1],
             eps_std = 0.42) %>% summary()
```

### Experiment 4 - Leader (Timing = Post)
```{r study4l-leader-t3-explicit-vs-implicit}
equiv.t.test(study4l$leader_index[study4l$timing == 3 & study4l$three_conditions == 0],
             study4l$leader_index[study4l$timing == 3 & study4l$three_conditions == 1],
             eps_std = 0.40) %>% summary()
```

### Experiment 4 - Leader (Timing = Two-wave)
```{r study4l-leader-t1-explicit-vs-implicit}
equiv.t.test(study4l$leader_index[study4l$timing == 1 & study4l$three_conditions == 0],
             study4l$leader_index[study4l$timing == 1 & study4l$three_conditions == 1],
             eps_std = 0.39) %>% summary()
```

## H4 - High Symbolic Racism

### Filter Data
```{r filter-high-symrac, message=FALSE}
study1h <- study1 %>%
  filter(symrac01 >= 0.5)

study4h <- study4 %>%
  filter(symrac01 >= 0.5)
```

### Experiment 1 - Healthcare Pre vs Post (Implicit)
```{r equiv-study1h-hc-implicit-prepost}
equiv.t.test(study1h$hc_index[study1h$timing == 2 & study1h$three_conditions == 1],
             study1h$hc_index[study1h$timing == 3 & study1h$three_conditions == 1],
             eps_std = 0.26) %>% summary()
```

### Experiment 1 - Healthcare Pre vs Post (Explicit)
```{r equiv-study1h-hc-explicit-prepost}
equiv.t.test(study1h$hc_index[study1h$timing == 2 & study1h$three_conditions == 0],
             study1h$hc_index[study1h$timing == 3 & study1h$three_conditions == 0],
             eps_std = 0.20) %>% summary()
```

### Experiment 4 - Healthcare Pre vs Post (Implicit)
```{r equiv-study4h-hc-implicit-prepost}
equiv.t.test(study4h$hc_index[study4h$timing == 2 & study4h$three_conditions == 1],
             study4h$hc_index[study4h$timing == 3 & study4h$three_conditions == 1],
             eps_std = 0.21) %>% summary()
```

### Experiment 4 - Healthcare Pre vs Post (Explicit)
```{r equiv-study4h-hc-explicit-prepost}
equiv.t.test(study4h$hc_index[study4h$timing == 2 & study4h$three_conditions == 0],
             study4h$hc_index[study4h$timing == 3 & study4h$three_conditions == 0],
             eps_std = 0.22) %>% summary()
```

### Experiment 1 - Leader Pre vs Post (Implicit)
```{r equiv-study1h-leader-implicit-prepost}
equiv.t.test(study1h$leader_index[study1h$timing == 2 & study1h$three_conditions == 1],
             study1h$leader_index[study1h$timing == 3 & study1h$three_conditions == 1],
             eps_std = 0.15) %>% summary()
```

### Experiment 1 - Leader Pre vs Post (Explicit)
```{r equiv-study1h-leader-explicit-prepost}
equiv.t.test(study1h$leader_index[study1h$timing == 2 & study1h$three_conditions == 0],
             study1h$leader_index[study1h$timing == 3 & study1h$three_conditions == 0],
             eps_std = 0.17) %>% summary()
```

### Experiment 4 - Leader Pre vs Post (Implicit)
```{r equiv-study4h-leader-implicit-prepost}
equiv.t.test(study4h$leader_index[study4h$timing == 2 & study4h$three_conditions == 1],
             study4h$leader_index[study4h$timing == 3 & study4h$three_conditions == 1],
             eps_std = 0.21) %>% summary()
```

### Experiment 4 - Leader Pre vs Post (Explicit)
```{r equiv-study4h-leader-explicit-prepost}
equiv.t.test(study4h$leader_index[study4h$timing == 2 & study4h$three_conditions == 0],
             study4h$leader_index[study4h$timing == 3 & study4h$three_conditions == 0],
             eps_std = 0.16) %>% summary()
```



### Experiment 1 - Healthcare 2-Wave vs Pre (Implicit)
```{r equiv-study1h-hc-implicit-2wavepre}
equiv.t.test(study1h$hc_index[study1h$timing == 1 & study1h$three_conditions == 1],
             study1h$hc_index[study1h$timing == 2 & study1h$three_conditions == 1],
             eps_std = 0.35) %>% summary()
```

### Experiment 1 - Healthcare 2-Wave vs Pre (Explicit)
```{r equiv-study1h-hc-explicit-2wavepre}
equiv.t.test(study1h$hc_index[study1h$timing == 1 & study1h$three_conditions == 0],
             study1h$hc_index[study1h$timing == 2 & study1h$three_conditions == 0],
             eps_std = 0.01) %>% summary()
```

### Experiment 4 - Healthcare 2-Wave vs Pre (Implicit)
```{r equiv-study4h-hc-implicit-2wavepre}
equiv.t.test(study4h$hc_index[study4h$timing == 1 & study4h$three_conditions == 1],
             study4h$hc_index[study4h$timing == 2 & study4h$three_conditions == 1],
             eps_std = 0.21) %>% summary()
```

### Experiment 4 - Healthcare 2-Wave vs Pre (Explicit)
```{r equiv-study4h-hc-explicit-2wavepre}
equiv.t.test(study4h$hc_index[study4h$timing == 1 & study4h$three_conditions == 0],
             study4h$hc_index[study4h$timing == 2 & study4h$three_conditions == 0],
             eps_std = 0.01) %>% summary()
```

### Experiment 1 - Leader 2-Wave vs Pre (Implicit)
```{r equiv-study1h-leader-implicit-2wavepre}
equiv.t.test(study1h$leader_index[study1h$timing == 1 & study1h$three_conditions == 1],
             study1h$leader_index[study1h$timing == 2 & study1h$three_conditions == 1],
             eps_std = 0.26) %>% summary()
```

### Experiment 1 - Leader 2-Wave vs Pre (Explicit)
```{r equiv-study1h-leader-explicit-2wavepre}
equiv.t.test(study1h$leader_index[study1h$timing == 1 & study1h$three_conditions == 0],
             study1h$leader_index[study1h$timing == 2 & study1h$three_conditions == 0],
             eps_std = 0.19) %>% summary()
```

### Experiment 4 - Leader 2-Wave vs Pre (Implicit)
```{r equiv-study4h-leader-implicit-2wavepre}
equiv.t.test(study4h$leader_index[study4h$timing == 1 & study4h$three_conditions == 1],
             study4h$leader_index[study4h$timing == 2 & study4h$three_conditions == 1],
             eps_std = 0.20) %>% summary()
```

### Experiment 4 - Leader 2-Wave vs Pre (Explicit)
```{r equiv-study4h-leader-explicit-2wavepre}
equiv.t.test(study4h$leader_index[study4h$timing == 1 & study4h$three_conditions == 0],
             study4h$leader_index[study4h$timing == 2 & study4h$three_conditions == 0],
             eps_std = 0.15) %>% summary()
```

### Experiment 1 - Healthcare 2-Wave vs Post (Implicit)
```{r equiv-study1h-hc-implicit-2wavepost}
equiv.t.test(study1h$hc_index[study1h$timing == 1 & study1h$three_conditions == 1],
             study1h$hc_index[study1h$timing == 3 & study1h$three_conditions == 1],
             eps_std = 0.24) %>% summary()
```

### Experiment 1 - Healthcare 2-Wave vs Post (Explicit)
```{r equiv-study1h-hc-explicit-2wavepost}
equiv.t.test(study1h$hc_index[study1h$timing == 1 & study1h$three_conditions == 0],
             study1h$hc_index[study1h$timing == 3 & study1h$three_conditions == 0],
             eps_std = 0.21) %>% summary()
```

### Experiment 4 - Healthcare 2-Wave vs Post (Implicit)
```{r equiv-study4h-hc-implicit-2wavepost}
equiv.t.test(study4h$hc_index[study4h$timing == 1 & study4h$three_conditions == 1],
             study4h$hc_index[study4h$timing == 3 & study4h$three_conditions == 1],
             eps_std = 0.01) %>% summary()
```

### Experiment 4 - Healthcare 2-Wave vs Post (Explicit)
```{r equiv-study4h-hc-explicit-2wavepost}
equiv.t.test(study4h$hc_index[study4h$timing == 1 & study4h$three_conditions == 0],
             study4h$hc_index[study4h$timing == 3 & study4h$three_conditions == 0],
             eps_std = 0.21) %>% summary()
```

### Experiment 1 - Leader 2-Wave vs Post (Implicit)
```{r equiv-study1h-leader-implicit-2wavepost}
equiv.t.test(study1h$leader_index[study1h$timing == 1 & study1h$three_conditions == 1],
             study1h$leader_index[study1h$timing == 3 & study1h$three_conditions == 1],
             eps_std = 0.24) %>% summary()
```

### Experiment 1 - Leader 2-Wave vs Post (Explicit)
```{r equiv-study1h-leader-explicit-2wavepost}
equiv.t.test(study1h$leader_index[study1h$timing == 1 & study1h$three_conditions == 0],
             study1h$leader_index[study1h$timing == 3 & study1h$three_conditions == 0],
             eps_std = 0.22) %>% summary()
```

### Experiment 4 - Leader 2-Wave vs Post (Implicit)
```{r equiv-study4h-leader-implicit-2wavepost}
equiv.t.test(study4h$leader_index[study4h$timing == 1 & study4h$three_conditions == 1],
             study4h$leader_index[study4h$timing == 3 & study4h$three_conditions == 1],
             eps_std = 0.11) %>% summary()
```

### Experiment 4 - Leader 2-Wave vs Post (Explicit)
```{r equiv-study4h-leader-explicit-2wavepost}
equiv.t.test(study4h$leader_index[study4h$timing == 1 & study4h$three_conditions == 0],
             study4h$leader_index[study4h$timing == 3 & study4h$three_conditions == 0],
             eps_std = 0.01) %>% summary()
```

### Experiment 1 - Healthcare Same Timing (Timing = Pre)
```{r equiv-study1h-hc-t2-explicit-vs-implicit}
equiv.t.test(study1h$hc_index[study1h$timing == 2 & study1h$three_conditions == 0],
             study1h$hc_index[study1h$timing == 2 & study1h$three_conditions == 1],
             eps_std = 0.20) %>% summary()
```

### Experiment 1 - Healthcare Same Timing (Timing = Post)
```{r equiv-study1h-hc-t3-explicit-vs-implicit}
equiv.t.test(study1h$hc_index[study1h$timing == 3 & study1h$three_conditions == 0],
             study1h$hc_index[study1h$timing == 3 & study1h$three_conditions == 1],
             eps_std = 0.28) %>% summary()
```

### Experiment 1 - Healthcare Same Timing (Timing = Two-wave)
```{r equiv-study1h-hc-t1-explicit-vs-implicit}
equiv.t.test(study1h$hc_index[study1h$timing == 1 & study1h$three_conditions == 0],
             study1h$hc_index[study1h$timing == 1 & study1h$three_conditions == 1],
             eps_std = 0.30) %>% summary()
```

### Experiment 4 - Healthcare Same Timing (Timing = Pre)
```{r equiv-study4h-hc-t2-explicit-vs-implicit}
equiv.t.test(study4h$hc_index[study4h$timing == 2 & study4h$three_conditions == 0],
             study4h$hc_index[study4h$timing == 2 & study4h$three_conditions == 1],
             eps_std = 0.16) %>% summary()
```

### Experiment 4 - Healthcare Same Timing (Timing = Post)
```{r equiv-study4h-hc-t3-explicit-vs-implicit}
equiv.t.test(study4h$hc_index[study4h$timing == 3 & study4h$three_conditions == 0],
             study4h$hc_index[study4h$timing == 3 & study4h$three_conditions == 1],
             eps_std = 0.15) %>% summary()
```

### Experiment 4 - Healthcare Same Timing (Timing = Two-wave)
```{r equiv-study4h-hc-t1-explicit-vs-implicit}
equiv.t.test(study4h$hc_index[study4h$timing == 1 & study4h$three_conditions == 0],
             study4h$hc_index[study4h$timing == 1 & study4h$three_conditions == 1],
             eps_std = 0.18) %>% summary()
```

### Experiment 1 - Leader Same Timing (Timing = Pre)
```{r equiv-study1h-leader-t2-explicit-vs-implicit}
equiv.t.test(study1h$leader_index[study1h$timing == 2 & study1h$three_conditions == 0],
             study1h$leader_index[study1h$timing == 2 & study1h$three_conditions == 1],
             eps_std = 0.01) %>% summary()
```

### Experiment 1 - Leader Same Timing (Timing = Post)
```{r equiv-study1h-leader-t3-explicit-vs-implicit}
equiv.t.test(study1h$leader_index[study1h$timing == 3 & study1h$three_conditions == 0],
             study1h$leader_index[study1h$timing == 3 & study1h$three_conditions == 1],
             eps_std = 0.19) %>% summary()
```

### Experiment 1 - Leader Same Timing (Timing = Two-wave)
```{r equiv-study1h-leader-t1-explicit-vs-implicit}
equiv.t.test(study1h$leader_index[study1h$timing == 1 & study1h$three_conditions == 0],
             study1h$leader_index[study1h$timing == 1 & study1h$three_conditions == 1],
             eps_std = 0.22) %>% summary()
```

### Experiment 4 - Leader Same Timing (Timing = Pre)
```{r equiv-study4h-leader-t2-explicit-vs-implicit}
equiv.t.test(study4h$leader_index[study4h$timing == 2 & study4h$three_conditions == 0],
             study4h$leader_index[study4h$timing == 2 & study4h$three_conditions == 1],
             eps_std = 0.09) %>% summary()
```

### Experiment 4 - Leader Same Timing (Timing = Post)
```{r equiv-study4h-leader-t3-explicit-vs-implicit}
equiv.t.test(study4h$leader_index[study4h$timing == 3 & study4h$three_conditions == 0],
             study4h$leader_index[study4h$timing == 3 & study4h$three_conditions == 1],
             eps_std = 0.24) %>% summary()
```

### Experiment 4 - Leader Same Timing (Timing = Two-wave)
```{r equiv-study4h-leader-t1-explicit-vs-implicit}
equiv.t.test(study4h$leader_index[study4h$timing == 1 & study4h$three_conditions == 0],
             study4h$leader_index[study4h$timing == 1 & study4h$three_conditions == 1],
             eps_std = 0.21) %>% summary()
```

# Power 
## Wave 1 n = 2394
```{r}
pwr.anova.test(k = 3, n = 798, sig.level = 0.05, power = 0.80)
```

## Wave 2 n = 3114
```{r}
pwr.anova.test(k = 3, n = 1157, sig.level = 0.05, power = 0.80)
```